#include "ResponseChain.hpp"

int main() {
  std::cout << "new two Handlers now: MoreClearHandler and MoreClearHandler2"
            << std::endl;
  MoreClearHandler *handler1 = new MoreClearHandler();
  MoreClearHandler2 *handler2 = new MoreClearHandler2();
  // handler1's successor is handler2
  handler1->SetSuccessor(handler2); // now the successor is not nullptr
  std::cout << "[DEBUG]: handler1->HandlerRequest() failed? " << std::endl;
  handler1->HandleRequest(); // now let handler1 to run his own method, this
                             // should automatically call successor's own method

#ifdef _WIN32
  system("pause");
#endif
  return 0;
}
